//
//  HMFunction.m
//  localLife
//
//  Created by Limonwei on 15/11/23.
//  Copyright © 2015年 heima. All rights reserved.
//

#import "HMFunction.h"
#import "MD5.h"

@implementation HMFunction

+(void)saveValue:(BOOL)value forKey:(NSString *)key{
    
    [[NSUserDefaults standardUserDefaults]setBool:value forKey:key];
    
    [[NSUserDefaults standardUserDefaults] synchronize];
    
    
}

+(NSString *)getTime{
    
    
    return [NSString stringWithFormat:@"%f",[[NSDate date] timeIntervalSince1970]];
}

+(NSString *)signMD5String:(NSArray *)array{
    
    NSMutableString *signStr = [[NSMutableString alloc]init];
    
    [array enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        
        [signStr appendString:obj];
        //
    }];
    
    return [MD5 MD5Encrypt:signStr];
    
}

@end



















